package com.dhecp.project.flowable.service;

import com.dhecp.common.core.domain.AjaxResult;
import com.fasterxml.jackson.databind.node.ObjectNode;
import com.github.pagehelper.Page;
import org.flowable.engine.repository.Model;

import javax.xml.stream.XMLStreamException;
import java.io.InputStream;
import java.io.UnsupportedEncodingException;
import java.util.Map;

/**
 * @InterfaceName ProcessModelService
 * @Description TODO
 * @Author alula
 * @Date 2019-11-27 10:07
 */
public interface ActProcessModelService {

    Page<Model> queryModelList(Map<String, Object> params);

    Model queryModelById(String modelId);

    Model getNewModel();

    ObjectNode queryWrapModelById(String modelId);

    AjaxResult addModel(Model model, String description) throws Exception;

    AjaxResult updateModel(Model model, String json_xml, String svg_xml) throws Exception;

    AjaxResult deleteModelByIds(String ids);

    AjaxResult deployModel(String modelId) throws Exception;

    AjaxResult importModel(String editor, String fileName) throws UnsupportedEncodingException, XMLStreamException;

    byte[] getModelEditorSource(String modelId);
}
